<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page contentType="text/html; charset=utf-8"%>
	<%@ include file="/commons/taglibs.jsp"%>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>我的申请列表</title>

		<%@ include file="/commons/css_js_head.jsp"%>


		<script type="text/javascript">
//复写Url
doApplyUrl = "${ctx }/base/typeAuditAction!doChageMyApply.ts"

function   doApplyAll(status) 
{ 
    //把选中的checkbox 的value 放到一个数组里 进行批量的 取消
    var   checkbox   =   document.getElementsByName( "checkbox"); 
	a = new Array(checkbox.length);
    for   (var   i=0;   i < checkbox.length;   i++) 
    { 
	   
        if (checkbox[i].checked)
		{
		  var value = checkbox[i].value;
		  a[i] = value;
		}
    } 
    doApply(a,status); 
} 
//取消申请
function doApply(pkId,status) {

	var _form = document.forms[0];
	if (doApplyUrl == '') {
		alert('请设置正确的URL!');
		return false;
	}
	_form.action = doApplyUrl + "?theId=" + pkId+"&status="+status;
	_form.submit();
}

  //批量选择
  checkit  =  true;      
  function   SelectAll()  {
   var checkbox   =   document.getElementsByName("checkbox");      
      if (checkit)      
      {      
      for(i=0;i<checkbox.length;i++)
              
        checkbox.item(i).checked=true;   
        checkit = false;      
      }      
      else      
      {      
      for(i=0;i<checkbox.length;i++)      
        checkbox.item(i).checked=false;      
        checkit = true;      
      }      
}
</script>


	</head>
	<body style="overflow-x: hidden">

		<!-- 标题 -->
		<div class="mTitle">
			<span class="hidsearch"><a href="javascript:void(0)"
				onClick="return chg('searchList');" id="ImgArrow"> <img
						src="${ctx}/images/icon_up.gif" id="imgButton" />
			</a> </span>
			<b class="bbig">我的申请</b>
			
		</div>

		<!--list -->
		<div class="searchBar" id="searchList" style="display: block;">
			<form action="/base/typeAuditAction!doChageMyApply.ts" method="post">
			
			
			  <table class="listTable">
				<tr>
					<th> <input type="checkbox" name="all" onclick="SelectAll()"/>批量操作</th>
					<th>
						发起人
					</th>
					<th>
						审核人
					</th>
					<th>
						终端类型
					</th>
					<th>
						应用类型
					</th>
					<th>
						状态
					</th>
					<th>
						操作
					</th>
				</tr>
				<c:forEach var="typeAudit" varStatus="status" items="${pager.data}">
					<tr align=center>
						<td><input type="checkbox" name="checkbox" value="${typeAudit.theId }" /> </td>
						<td>
							${typeAudit.startUserName}
						</td>
						<td>
							${typeAudit.endUserName }
						</td>
						<td>
							${typeAudit.theIdmachine}
						</td>
						<td>
							${typeAudit.theIdapply}
						</td>
						<td>
						<c:if test="${typeAudit.status == '1'}"> 取消 </c:if>
						<c:if test="${typeAudit.status == '0' }">审核通过</c:if>
						<c:if test="${typeAudit.status == '2'}">审核不通过</c:if>
						</td>
						
						<td>

						<a href="javascript:void(0)" onclick="javascript:doApply('${typeAudit.theId },','1');"><span class="icon_edit">&nbsp;</span>取消</a>
						</td>
					</tr>
					</c:forEach>
			</table>
	
				
		</div>
		<!--end list -->

		
		 
		  <a href="javascript:void(0)" onclick="javascript:doApplyAll('1');"><span class="icon_edit">&nbsp;</span>批量取消</a>


		<!-- 分页区域  -->
<%@ include file="/page/pager.jsp"%>

<script type="text/javascript">
ajaxAnywhere.formName = "form1";
ajaxAnywhere.getZonesToReload = function() {
    return "zoneList";
}
</script>

	</body>
</html>
